#ifndef  __COMBAT_DEFINITION___
#define  __COMBAT_DEFINITION___


namespace Combat
{
	enum CombatTarget
	{
		Tgt_Enemy,
		Tgt_EnemyInRange,
		Tgt_Alies,
		Tgt_AliesAndSelf,
		Tgt_Self,
	};

	//
	//	Combat State:
	//	state Peace:		no combat
	//	state Ready:		in combat, ready for casting a spell to its target
	//	state Casting:		in combat, casting a spell on its target
	//	state CoolDown:		in combat, cool down time interval just after a previous spell is casted
	//	state Forbidden:	in combat, forbidden to cast a spell
	//	state Charging:		in combat, approaching to its target for casting a spell
	//
	enum CombatState
	{
		CBS_Begin	= -1,			//	Invalid

		CBS_Peace,			//	not in combat with some others
		CBS_Ready,			//	in combat, ready to cast a spell
		CBS_Casting,		//	in combat, casting spell
		CBS_CoolDown,		//	in combat, cool down time between two spell cast
		CBS_Forbidden,		//	in combat, forbidden to cast a spell
		CBS_Charging,       //	in combat, charging for an melee or ranged attack
		CBS_Standby,			//	out of combat temperately, all casting operation will cancel this state

		CBS_End,			//	Invalid
	};

	enum CombatFaction
	{
		FC_Unknown,
		FC_Player,
		FC_Monster,

		FC_Max,
	};

	enum CombatFlagIndex
	{
		FIdx_Daze,
		FIdx_Forbbiden_CastMelee,
		FIdx_CanBeTargeted,
		FIdx_75ToHit,
		FIdx_ZeroToDodge,
	};

	enum CombatProperty
	{
		CBP_Start			= 0,
		CBP_Class_Start		= 0,
		
		CBP_Soldier			= 0,
		CBP_Wizard,
		CBP_Explorer,
		CBP_Beauty,
		CBP_Dancer,

		CBP_Class_End		= 5,
		CBP_Element_Start	= 5,

		CBP_Fire			= 5,
		CBP_Water,
		CBP_Light,
		CBP_Earth,
		CBP_Spirit,

		CBP_Element_End		= 10,
		CBP_Attribute_Start	= 10,

		CBP_Power			= 10,
		CBP_Toughness,
		CBP_Evade,
		CBP_Luck,
		CBP_Focus,

		CBP_Attribute_End	= 15,
		CBP_End				= 15,
	};

	inline	bool CBP_Validate(const short& nIdx)
	{
		return nIdx>=CBP_Start && nIdx<CBP_End;
	}
}
#endif
